package com.mapper;

import java.util.List;

public interface OrdersMapper {

    int deleteByPrimaryKey(Long id);

    <Orders> int insert(Orders record);

    <Orders> int insertSelective(Orders record);

    <Orders> Orders selectByPrimaryKey(Long id);

    <Orders> int updateByPrimaryKeySelective(Orders record);

    <Orders> int updateByPrimaryKey(Orders record);

    <Orders> Orders findOrdersWithProduct(Integer id);

    @Select("select *from mybatis.tb_orders where id=#{id}")
    @Results({@Result(id = true,column = "id" ,property = "id"),@Result(column = "number" ,property = "number")})
    <Orders>
    List<Orders> selectOrdersByUserId(int user_id);
}
